import request from '@/utils/request'

export const getDepartments = function() {
  return request.get('api/company/department')
}

export const getSimpleEmployee = function() {
  return request.get('api/sys/user/simple')
}

export const addDepartment = function(data) {
  return request.post('api/company/department', data)
}

export const delDepartment = function(id) {
  return request.delete('api/company/department/' + id)
}

export const getDepartmentById = function(id) {
  return request.get('api/company/department/' + id)
}

export const updataDepartment = function(data) {
  return request.put('api/company/department/' + data.id, data)
}
